load("//bazel:tachyon_cc.bzl", "tachyon_cc_library", "tachyon_cc_unittest")

package(default_visibility = ["//visibility:public"])

tachyon_cc_library(
    name = "ell_coeff",
    hdrs = ["ell_coeff.h"],
    deps = ["@com_google_absl//absl/strings"],
)

tachyon_cc_library(
    name = "g2_prepared_base",
    hdrs = ["g2_prepared_base.h"],
    deps = [
        ":ell_coeff",
        "//tachyon/base/strings:string_util",
    ],
)

tachyon_cc_library(
    name = "g2_projective",
    hdrs = ["g2_projective.h"],
    deps = [
        ":ell_coeff",
        ":twist_type",
    ],
)

tachyon_cc_library(
    name = "pairing",
    hdrs = ["pairing.h"],
    deps = [
        "//tachyon/base:template_util",
        "//tachyon/base/containers:container_util",
    ],
)

tachyon_cc_library(
    name = "pairing_friendly_curve",
    hdrs = ["pairing_friendly_curve.h"],
    deps = [
        ":ell_coeff",
        ":twist_type",
        "@com_google_absl//absl/base",
    ],
)

tachyon_cc_library(
    name = "twist_type",
    hdrs = ["twist_type.h"],
    deps = [
        "//tachyon/base:logging",
        "//tachyon/base/flag",
        "@com_google_absl//absl/strings",
    ],
)

tachyon_cc_unittest(
    name = "pairing_unittests",
    srcs = ["pairing_unittest.cc"],
    deps = [
        ":pairing",
        "//tachyon/math/elliptic_curves/bls12/bls12_381",
        "//tachyon/math/elliptic_curves/bn/bn254",
    ],
)
